<?php


namespace app\admin\order\validate;


use app\common\validate\BaseValidate;

class OrderValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require',

        'delivery_code' => 'requireIf:type,1',
        'delivery_name' => 'requireIf:type,1',
        'delivery_no' => 'requireIf:type,1',
        'order_detail_ids' => 'must',
        'order_id' => 'require',
        'split_order' => 'require',
        'type' => 'require',
    ];

    protected $field = [
        'id' => 'ID',

        'delivery_code' => '快递公司code',
        'delivery_name' => '快递公司名称',
        'delivery_no' => '快递单号',
        'order_detail_ids' => 'sku数据',
        'order_id' => '订单id',
        'type' => '发货类型',
    ];
    protected $scene = [
        "id" => [
            'id',
        ],
        "express" => [
            'delivery_code',
            'delivery_name',
            'delivery_no',
            'order_detail_ids',
            'order_id',
            'type',
        ]
    ];
}